Managing Positions
Positions are created and managed via the Position Manager contract. This enables users to borrow assets and execute arbitrary data and actions on a position. Sentiment v2 opts to have containerized positions since it enables frictionless leveraged lending activities. Position Manager is also equipped with robust batching functionality which provides superior ux for users and integrators
Creating a Position
New Positions
function newPosition(address predictedAddress, bytes calldata data) internal
Some key features of creating new positions
- positions have a predicted address which prevents front running
- data is always packed
- data is parsed to fetch actions and parameters for specific actions
Parameters | type | Description |
---|---|---|
predictedAddress | address | predicted address of position |
data | bytes | calldata passed along containing the position owner address and salt |